package com.example.goods_service.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface GoodsDao_zhoufuyu {
    @Update("update t_commodity set " +
            "commodity_name=#{commodity_name}," +  //名称
            "commodity_description=#{commodity_description}," +     //描述
            "commodity_picture=#{commodity_picture}," +     //图片
            "commodity_price=#{commodity_price} ," +       //价格
            "status=#{status} " +       //状态
            "where id=#{id}")
    int upgoods(String commodity_name,String commodity_description,int commodity_picture,double commodity_price,String status,int id);

    @Update("update t_commodity_allocation set commodity_name=#{commodity_name},attribute=#{attribute},price=#{price},stock=#{stock},update_time=#{update_time} where id=#{id}")
    int upcommodity_allocation(int commodity_name,String attribute,double price,int stock,String update_time);
}
